﻿#ifndef ROUNDBUTTON_H
#define ROUNDBUTTON_H

#include <QGraphicsWidget>

class RoundButton : public QGraphicsWidget
{
    Q_OBJECT
public:
    RoundButton(QString strFace, QGraphicsItem* parent = 0);
    ~RoundButton();

signals:
    void pressed();

protected:
    QRectF boundingRect() const;
    QPainterPath shape() const;
    void paint(QPainter *painter,
               const QStyleOptionGraphicsItem *option,
               QWidget *widget);
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
    void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);


private:
    QString m_strFace;
};

#endif // ROUNDBUTTON_H
